import home from '@/views/home/index.vue'
import login from '@/views/login/index.vue'
import nofound from '@/views/404/index.vue'
import screen from '@/views/screen/index.vue'
import main from '@/views/mainhome/index.vue'
import user from '@/views/acl/components/AclUser.vue'
import role from '@/views/acl/components/AclRole.vue'
import permission from '@/views/acl/components/AclPerssion.vue'
import spu from '@/views/product/spu.vue'
import sku from '@/views/product/sku.vue'
import attr from '@/views/product/attr.vue'
import trademark from '@/views/product/trademark.vue'
export const routers = [
  {
    path: '/',
    component: home,
    name: 'home',
    redirect: '/home',
    meta: {
      title: '', //菜单标题
      hidden: false,
    },
    children: [
      {
        path: '/home',
        component: main,
        meta: {
          title: '首页', //菜单标题
          hidden: false,
          icon: 'House',
        },
      },
    ],
  },
  {
    path: '/login',
    component: login,
    name: 'login',
    meta: {
      title: '登录', //菜单标题
      hidden: true,
    },
  },
  {
    path: '/screen',
    component: screen,
    name: 'Screen',
    meta: {
      icon: 'DataAnalysis',
      title: '数据大屏',
      hidden: false,
    },
  },
  {
    path: '/404',
    component: nofound,
    name: '404',
    meta: {
      title: '404', //菜单标题
      hidden: true,
    },
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'CirclePlus',
    },
  },
]
export const asnyrouter = [
  {
    path: '/acl',
    component: home,
    name: 'Acl',
    meta: {
      title: '权限管理',
      hidden: false,
      icon: 'Lock',
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        component: user,
        name: 'User',
        meta: {
          title: '用户管理',
          hidden: false,
          icon: 'UserFilled',
        },
      },
      {
        path: '/acl/role',
        component: role,
        name: 'Role',
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'User',
        },
      },
      {
        path: '/acl/permission',
        component: permission,
        name: 'Permission',
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Grid',
        },
      },
    ],
  },
  {
    path: '/product',
    component: home,
    name: 'Product',
    meta: {
      title: '商品管理',
      icon: 'Goods',
      hidden: false,
    },
    redirect: '/product/trademark',
    children: [
      {
        path: '/product/trademark',
        component: trademark,
        name: 'Trademark',
        meta: {
          title: '品牌管理',
          icon: 'ShoppingCartFull',
          hidden: false,
        },
      },
      {
        path: '/product/attr',
        component: attr,
        name: 'Attr',
        meta: {
          title: '属性管理',
          icon: 'ChromeFilled',
          hidden: false,
        },
      },
      {
        path: '/product/spu',
        component: spu,
        name: 'Spu',
        meta: {
          title: 'SPU管理',
          icon: 'Calendar',
          hidden: false,
        },
      },
      {
        path: '/product/sku',
        component: sku,
        name: 'Sku',
        meta: {
          title: 'SKU管理',
          icon: 'Orange',
          hidden: false,
        },
      },
    ],
  },
]